<!doctype html>
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>修改员工信息</title>
    <link rel="stylesheet" href="/vendor/simple-line-icons/css/simple-line-icons.css">
    <link rel="stylesheet" href="/vendor/font-awesome/css/fontawesome-all.min.css">
    <link rel="stylesheet" href="/css/styles.css">
</head>
<body>
<form th:action="@{/reviseStaff}" method="post">
    <input type="hidden" th:value="${staff.getStaffId()}" name="staffId"><input type="hidden"
                                                                                th:value="${staff.getGender()}"
                                                                                name="gender">
    <div class="content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-md-10">
                    <div class="card">
                        <div class="card-header bg-light">
                            员工信息修改
                        </div>
                        <div class="card-body">
                            <div class="row mb-5">
                                <div class="col-md-4 mb-4">
                                    <div>你好，老板</div>
                                    <div class="text-muted small">以下是可以修改的信息</div>
                                </div>

                                <div class="col-md-8">
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="form-control-label">客户姓名</label>
                                                <input class="form-control" id="staffName" name="staffName"
                                                       th:value="${staff.getStaffName()}">
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="form-control-label">邮箱地址</label>
                                                <input class="form-control" name="email" th:value="${staff.getEmail()}">
                                            </div>
                                        </div>

                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="form-control-label">电话号码</label>
                                                <input class="form-control" id="phone" name="phone"
                                                       th:value="${staff.getPhone()}">
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <!--                                            <div class="form-group">-->
                                            <!--                                                <label class="form-control-label">上级主管</label>-->
                                            <!--                                                <input class="form-control" id="modelManager" name="modelManager" th:value="${staff.getModelManager()}">-->
                                            <!--                                            </div>-->
                                            <div class="form-group">
                                                <label class="form-control-label">上级主管</label>
                                                <select id="modelManager" th:field="${staff.modelManager}"
                                                        class="form-control" name="modelManager">
                                                    <option value="模型主管">模型主管</option>
                                                    <option value="渲染主管">渲染主管</option>
                                                    <option value="后期主管">后期主管</option>
                                                </select>
                                            </div>
                                        </div>

                                    </div>

                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="form-control-label">kpi</label>
                                                <input class="form-control" id="kpi" name="kpi"
                                                       th:value="${staff.getKpi()}">
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="form-control-label">评价</label>
                                                <input class="form-control" id="evaluate" name="evaluate"
                                                       th:value="${staff.getEvaluate()}">
                                            </div>
                                        </div>
                                    </div>

                                </div>
                            </div>
                            <hr>
                        </div>

                        <div class="card-footer bg-light text-right">
                            <a onclick="javascript:if (confirm('确定修改吗？')) { return true;}else{return false;};">
                                <button id="save" type="submit" class="btn btn-primary">保存修改</button>
                            </a>
                            <!--<a id="cancel"><button class="btn btn-primary">取消修改</button></a>-->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
<script src="/vendor/jquery/jquery.min.js"></script>
<script src="/vendor/popper.js/popper.min.js"></script>
<script src="/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="/vendor/chart.js/chart.min.js"></script>

<script>
    $("#save").click(function () {
        var pwd = $("#pwd").val();
        var pwd_confirm = $("#pwd_confirm").val();
        if (pwd != pwd_confirm) {
            alert("输入密码不一致");
            return false;
        }
        $("#save_form").submit();
    });

    /*$(document).ready(function () {
        var userId=$("#userId").val();
        alert(userId);
        $("#cancel").attr("href","/employee/getMyMsg");
     });*/
</script>
</body>
</html>
